#include <iostream>
#include <deque>
using namespace std;

int main(){
    deque<string> dq;
    string wold;

    while (cin >> wold){
        dq.push_back(wold);
    }

    for (auto it = dq.begin(); it != dq.end(); it++){
        cout << *it << " "; 
    }
    cout << endl;
    return 0;
}